import Vue from 'vue'
import VueRouter from 'vue-router'
import ElementUI from "element-ui"
import HomeIndex from "@/views/homeIndex.vue";

import VendingMachine from "@/views/machine/VendingMachine.vue";
import MachineHome from "@/views/machine/MachineHome.vue";
import SplitAdvertising from "@/views/other/otherViews/advertising/SplitAdvertising.vue";
import SplitAdDetail from "@/views/other/otherViews/advertising/SplitAdDetail.vue";
import AddSplitAdvertising from "@/views/other/otherViews/advertising/AddSplitAdvertising.vue";
import AppAdDetail from "@/views/other/otherViews/advertising/AppAdDetail.vue";
import AddAppAd from "@/views/other/otherViews/advertising/AddAppAd.vue";
import BannerAds from "@/views/other/otherViews/advertising/BannerAds.vue";
import StandbyAdvertising from "@/views/other/otherViews/advertising/StandbyAdvertising.vue";
import LandingPageAds from "@/views/other/otherViews/advertising/LandingPageAds.vue";
import AddMore from "@/views/machine/AddMore.vue";
import MachineDetail from "@/views/machine/MachineDetail.vue";
import BoxDetail from "@/views/machine/BoxDetail.vue";
import BoxList from "@/views/machine/BoxList.vue";
import ZhanghuPage from "@/views/zhang/ZhanghuPage.vue";
import XiangPage from "@/views/xiang/XiangPage.vue";
import ZhifuPage from "@/views/zhifu/ZhifuPage.vue";
import ZhiXiangPage from "@/views/zhifu/ZhiXiangPage.vue";
import ChongZhiPage from "@/views/zhifu/ChongZhiPage.vue";
import ChongXiangPage from "@/views/zhifu/ChongXiangPage.vue";
import HuilvPage from "@/views/zhifu/HuilvPage.vue";
import HuiXiangPage from "@/views/zhifu/HuiXiangPage.vue";
import expressList from "@/views/expressList/expressList/expressListPage.vue";
import expressAuthDetial from "@/views/expressList/expressAuthDetial/expressAuthDetial.vue";
import expressMember from "@/views/expressList/expressMember/expressMember.vue";
import expressAuth from "@/views/expressList/expressAuth/expressAuth.vue";
import expressDetial from "@/views/expressList/expressDetial/expressDetial.vue";
import FeebackXiangPage from "@/views/other/otherViews/expressFeeback/FeebackXiangPage.vue";
import HelloVue from "@/views/other/otherViews/advertising/HelloVue.vue";


// 使用VueRouter
Vue.use(VueRouter)
Vue.use(ElementUI);
// 创建路由实例
const router = new VueRouter({
    mode: 'history', // 使用HTML5 History模式
    routes: [
        {path: '/', component: HomeIndex,},//默认跳转首页
        {path: '/mapChart', component: () => import('@/views/MyMapChart.vue')},
        {path: '/expressList', component: expressList},
        {path: '/expressDetial', component: expressDetial},
        {path: '/zhanghuPage', component: ZhanghuPage},
        {path: '/xiangPage', component: XiangPage},
        {path: '/zhifuPage', component: ZhifuPage},
        {path: '/zhiXiangPage', component: ZhiXiangPage},
        {path: '/chongZhiPage', component: ChongZhiPage},
        {path: '/chongXiangPage', component: ChongXiangPage},
        {path: '/huilvPage', component: HuilvPage},
        {path: '/huiXiangPage', component: HuiXiangPage},
        {path: '/expressAuth', component: expressAuth},
        {path: '/expressAuthDetial', component: expressAuthDetial},
        {path: '/expressMember', component: expressMember},
        {path: '/feebackXiangPage', component: FeebackXiangPage},
        {
            path: '/machineHome',
            component: MachineHome,
            children: [
                {
                    path: '/',
                    component: VendingMachine,
                },
                {
                    path: '/addMore',
                    component: AddMore
                },
                {
                    path: '/machineDetail',
                    component: MachineDetail,
                    query: {
                        id: ''
                    }
                },
                {
                    path: '/boxDetail',
                    component: BoxDetail,
                    query: {
                        id: ''
                    }
                },
                {
                    path: '/boxList',
                    component: BoxList,
                    query: {
                        id: ''
                    }
                },
            ]
        },
        {
            path: '/login',
            component: () => import('@/views/login/loginView.vue')
        },
        {
            path: '/otherView',
            component: () => import('@/views/other/otherView.vue'),
            children: [
                {
                    path: '/accountManagement',
                    component: () => import('@/views/other/otherViews/AccountManagement.vue')
                },
                {
                    path: '/helloVue',
                    component: HelloVue,
                },
                {
                    path: '/splitAdvertising',
                    component: SplitAdvertising,
                },
                {
                    path: '/splitAdDetail',
                    component: SplitAdDetail,
                    query: {
                        id: ''
                    }
                },
                {
                    path: '/appAdDetail',
                    component: AppAdDetail,
                    query: {
                        id: '',
                        type: ''
                    }
                },
                {
                    path: '/addAppAd',
                    component: AddAppAd,
                    query: {
                        id: ''
                    }
                },
                {
                    path: '/standbyAdvertising',
                    component: StandbyAdvertising,
                },
                {
                    path: '/bannerAds',
                    component: BannerAds,
                },
                {
                    path: '/addSplitAdvertising',
                    component: AddSplitAdvertising,
                    query: {
                        id: ''
                    }
                },
                {
                    path: '/landingPageAds',
                    component: LandingPageAds,
                },
                {
                    path: '/homePage',
                    component: () => import('@/views/other/otherViews/notice/homgPage.vue')
                },
                {
                    path: '/OutPackage',
                    component: () => import('@/views/other/otherViews/package/OutPackage.vue')
                },
                {
                    path: '/dropdown',
                    component: () => import('@/views/other/otherViews/system/OutDown.vue')
                },
                {
                    path: '/ai',
                    component: () => import('@/views/other/otherViews/package/OutPackages.vue')
                },
                {
                    path: '/outkey',
                    component: () => import('@/views/other/otherViews/system/OutKey.vue')
                },
                {
                    path: '/OutSystems',
                    component: () => import('@/views/other/otherViews/system/OutSystems.vue')
                },
                {
                    path: '/authorityColumn',
                    component: () => import('@/views/other/otherViews/AuthorityColumn.vue')
                },
                {
                    path: '/roleManagement',
                    component: () => import('@/views/other/otherViews/RoleManagement.vue'),
                },
                {
                    path: '/allocateResources',
                    component: () => import('@/views/other/otherViews/role/AllocateResources.vue')
                },//角色资源分配
                {
                    path: '/sonAccountManagement',
                    component: () => import('@/views/other/otherViews/SonAccountManagement.vue')
                },
                {
                    path: '/questionKindList',
                    component: () => import('@/views/other/questionKindList/questionKindList.vue')
                },
                {
                    path: '/questionList',
                    component: () => import('@/views/other/questionList/questionList.vue')
                },
                {
                    path: '/feebackPage',
                    component: () => import('@/views/other/otherViews/expressFeeback/FeebackPage.vue')
                },

            ]
        },
    ]
})


export default router